package net.ezsteam;

import net.ezsteam.cons.EzSteam_Urls;
import net.ezsteam.service.EzSteam_ForgotPass_Service;
import net.ezsteam.service.EzSteam_Login_Service_Rest;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class EzSteam_ForgotPassword_Activity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ezsteam_forgotpassword);
		
		Button btnsubmit = (Button) findViewById(R.id.btn_submit);
		Button btnregister = (Button) findViewById(R.id.btn_register);
		Button btnlogin = (Button) findViewById(R.id.btn_login);
		
		final EditText txtEmail = (EditText) findViewById(R.id.txt_username);
		
		
		btnregister.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {

				Intent intent = new Intent(EzSteam_ForgotPassword_Activity.this,EzSteam_Register_Activity.class);
				startActivity(intent);
				//finish();
			}
		});
		
		btnlogin.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {

				Intent intent = new Intent(EzSteam_ForgotPassword_Activity.this,EzSteam_LoginActivity.class);
				startActivity(intent);
				finish();
				
			}
		});

		btnsubmit.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {

				EzSteam_ForgotPass_Service rq = new EzSteam_ForgotPass_Service(EzSteam_ForgotPassword_Activity.this,txtEmail.getText().toString());
				 rq.execute(EzSteam_Urls.ForgotPass_Service);

			}
		});
	}

}
